<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ taglib uri="/WEB-INF/tlds/att.tld" prefix="att"%>
<html>

<head>
<meta name="decorator" content="moduleEdit" />
<script
	src="${staticPath}/lib/datetimepicker/0.0.11/js/bootstrap-datetimepicker.min.js"
	type="text/javascript"></script>
<script
	src="${staticPath}/lib/datetimepicker/0.0.11/js/locales/bootstrap-datetimepicker.zh-CN.js"
	type="text/javascript"></script>
<script src="${staticPath}/lib/accounting/0.3.2/accounting.min.js"
	type="text/javascript"></script>
<script type="text/javascript">
	$(document)
			.ready(
					function() {
						$(".o-a-form-date").datetimepicker({
							language : 'zh-CN',
							autoclose : true,
							minView : 2,
							todayBtn : 1,
							pickerPosition : "bottom-left"
						});

						$('[data-accounting]').each(function() {
											var $this = $(this);
											if ($this.attr("data-accounting-precision")
													&& "" != $this.attr("data-accounting-precision")) {
												$this.html(accounting.formatMoney(
														$this.attr("data-accounting"),"¥ ",$this.attr("data-accounting-precision") * 1));
											} else {
												$this.html(accounting.formatMoney(
																		$this.attr("data-accounting"),"¥ "));
											}
										});
					});
</script>


</head>
<body>
	<div class="panel panel-default">
		<div class="panel-heading">
			<h3 class="panel-title">
				新增异常信息 <a class="btn btn-default btn-sm pull-right o-a-button"
					role="button" href="javascript:void(0)" onclick="history.go(-1)">返回</a>
			</h3>
		</div>
		<div class="panel-body">
			<form id="statementStmError" class="form-horizontal"
				action="${contextPath}/statement/stm/error/save" method="post">
				<tags:message content="${message}" />
				<div class="form-group">
					<div class="col-sm-6">
						<label for="billNo" class="col-sm-4 control-label">结算单号:</label>
						<div class="col-sm-8">
							<input id="billNo" name="billNo" type="text"
								value="${stmCounter.billNo}" class="form-control"
								readonly="readonly" />
						</div>
					</div>
					<div class="col-sm-6">
						<label for="createTime" class="col-sm-4 control-label">提出日期:</label>
						<div class="col-sm-8">

							<input id="createTime" name="createTime"
								value="<fmt:formatDate value="${stmCounter.startTime }" pattern="yyyy-MM-dd"/>"
								class="form-control" readonly="readonly" />
						</div>

					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-6">
						<label for="supplierNo" class="col-sm-4 control-label">供应商编号:</label>
						<div class="col-sm-8">
							<input id="supplierNo" name="supplierNo" type="text"
								value="${stmCounter.supplierNo}" class="form-control"
								readonly="readonly" />
						</div>
					</div>
					<div class="col-sm-6">
						<label for="supplierName" class="col-sm-4 control-label">供应商名称:</label>
						<div class="col-sm-8">

							<input id="supplierName" name="supplierName"
								value="${stmCounter.supplierName }" class="form-control"
								readonly="readonly" />
						</div>
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-6">
						<label for="errorAmount" class="col-sm-4 control-label">有误金额:</label>
						<div class="col-sm-8">
							<input id="errorAmount" name="errorAmount"
								value="${stmCounter.amountPaid}" class="form-control" disabled />
						</div>
					</div>
					<div class="col-sm-6">
						<label for="date" class="col-sm-4 control-label">日期:</label>
						<div class="col-sm-8">

							<div class="input-group date o-a-form-date" data-date=""
								data-date-format="yyyy-mm-dd">
								<input class="form-control" type="text" name="endTime"
									value="<fmt:formatDate value="${stmCounter.endTime }" pattern="yyyy-MM-dd"/>"
									placeholder="提出日期" readonly /> <span class="input-group-addon"><i
									class="glyphicon glyphicon-calendar"></i></span>
							</div>
						</div>
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-6">
						<label for="actualAmount" class="col-sm-4 control-label">实际金额:</label>
						<div class="col-sm-8">
							<input id="actualAmount" name="actualAmount" type="text"
								class="form-control" value="${stmCounter.deductMoney}" />
						</div>
					</div>
					<div class="col-sm-6">
						<label for="item" class="col-sm-4 control-label">结算项目:</label>
						<div class="col-sm-8">
							<ossp:select dictType="ITEM" name="item" class_="form-control"
								value="${statementStmError.item}"></ossp:select>
						</div>
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-6">
						<label for="isConfirmed" class="col-sm-4 control-label">是否确认:</label>
						<input type="hidden" name="isConfirmed"
							value="${statementStmError.isConfirmed}">
						<div class="col-sm-8">

							<input id="isConfirmed" type="text"
								value="<c:if test="${statementStmError.isConfirmed==0}">未确认</c:if> <c:if
							test="${statementStmError.isConfirmed==1}">已确认</c:if>"
								class="form-control" disabled />
						</div>
					</div>
					<div class="col-sm-6">
						<label for=statementType class="col-sm-4 control-label">结算类型:</label>
						<div class="col-sm-8">
							<input name="statementType"
								value="${statementStmError.statementType}" class="form-control"
								readonly="readonly" />

						</div>
					</div>
				</div>
				<div class="form-group">
					<label for="exceptionHanding" class="col-sm-2 control-label">异常处理方案:</label>
					<div class="col-sm-10">
						<textarea id="exceptionHanding" name="exceptionHanding" rows="4"
							value="${statementStmError.exceptionHanding }"
							class="form-control"></textarea>
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-offset-2 col-sm-10">
						<input class="btn btn-primary" type="submit" value="提交异常" /> <input
							class="btn btn-default" type="button" value="返 回"
							onclick="history.go(-1)" />
					</div>
				</div>
			</form>
		</div>
	</div>
</body>
</html>